package com.witmore.skyline.web.controller;

import com.witmore.skyline.web.controller.vo.param.DeviceLocusListParamVO;
import com.witmore.skyline.web.controller.vo.result.ResponseResult;
import com.witmore.skyline.web.service.DeviceService;
import com.witmore.skyline.web.service.third.yjx.dto.DeviceLocusDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.validation.Valid;
import java.util.List;

/**
 * 设备轨迹接口
 * Author: 豆子高
 * Date: 2025/2/24 14:26
 */
@RestController
@RequestMapping("api/device/")
public class DeviceLocusController {
    @Autowired
    private DeviceService deviceService;


    /**
     * 行驶轨迹列表接口
     */
    @GetMapping(value = "locus/list", name = "行驶轨迹")
    public ResponseResult<List<DeviceLocusDTO>> locusList(@Valid DeviceLocusListParamVO deviceLocusListParamVO) {
        return deviceService.locusList(deviceLocusListParamVO.getDeviceSn(),
                deviceLocusListParamVO.getStartDay(), deviceLocusListParamVO.getEndDay());
    }

}
